<!-- Teacher_WeeklyNoReviewedFrameDetail_Frame.html -->
<!--老师查看未审核周报详情-->
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
		<meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
		<title>老师端日报详情页</title>
		<script src="../../script/mui.min.js"></script>
		<script src="../../script/jquery.min.js" type="text/javascript"></script>
		<script src="../../script/timecontrol.min.js"></script>
		<script src="../../script/common.js"></script>
		<link rel="stylesheet" href="../../css/mui.min.css" />
		<link rel="stylesheet" href="../../css/timecontrol.min.css" />
		<!--<link rel="stylesheet" href="../../css/CFNetPP_Base.css">-->
		<link rel="stylesheet" href="../../css/base.css"/>
		<link rel="stylesheet" type="text/css" href="../../css/weui.min.css">
		<script type="text/javascript" charset="utf-8">
			mui.init();
		</script>
	</head>
	<body>
		<div class="writeReport" id="all_div" >
			<div class="ReviewWeekly_div top_54" >
				<ul class="mui-table-view">
					<li class="mui-table-view-cell base_dark_grey" id="timediv_one" style="display: none">
						<div class="cell_left_img_div">
							<img class="cell_img" src="../../image/icon_clock.png" alt="">
						</div>
						<span class="time_span base_title_font" > 应交日期:</span>
						<span class="time_span base_title_font" id="weeklytime"> </span>
					</li>
					<li class="mui-table-view-cell base_dark_grey" id="timediv_two">
						<div class="cell_left_img_div">
							<img class="cell_img" src="../../image/icon_clock.png" alt="">
						</div>
						<span class="time_span base_title_font" > 提交日期:</span>
						<span class="time_span base_title_font" id="time"> </span>
					</li>
				</ul>
			</div>
			<div class="ReviewWeekly_div">
				<div class="feeling">
					<p class="title">
						本周总结
					</p>
					<div class="feeling-text">
						<p id="summary" style=" word-break: break-all">
							 <!--四大美女四大金刚的感觉金黄色的个结婚吗三等功三毒黄瓜斌和慕斯蛋糕设计的大概是谁没打过啥都没干后没你事海水倒灌金黄色的个吧们。三等功金黄色的个吧内部石膏板南京蛤蟆上个班是几十个喜欢订的高科技四大金刚后第三款估计明年。-->
						</p>
					</div>
				</div>
			</div>
			<div class="ReviewWeekly_div">
				<div class="feeling">
					<p class="title">
						下周计划
					</p>
					<div class="feeling-text">
						<p id="weekplan" style=" word-break: break-all">
							<!-- 《子夏易傳》十一卷，舊本題卜子夏撰。案説，易之家最古者莫若是書，其偽中生偽、至一至再而未已者，亦莫若是書。《唐會要》載開元七年詔：《子夏易傳》，近無習者，令儒官詳定。劉知幾議曰：《漢志》，易有十三家，而無子夏作傳者。至梁阮氏七錄始有《子夏易》六卷，或云韓嬰作，或云丁寛作。然據《漢書》韓易十二篇丁易八篇求其符合，事殊隳刺，必欲行用，深以為疑。司馬貞議亦曰：按劉向《七畧》有《子夏易傳》，但此書不行已久，今所存多失真本。荀朂《中經簿》云《子夏傳》四卷，或云丁寛，是先逹疑非子夏矣。又《隋書經籍志》云《子夏傳》殘缺，梁六卷，今二卷，知其書錯謬多矣。又王儉《七志》引劉向《七畧》云：易傳子夏韓氏嬰也，今題不稱韓氏而載薛虞記。其質麤畧，旨趣非逺,無益後學云云。是唐已前所謂《子夏傳》已為偽本，晁説之《傳易堂記》又稱今號為子夏傳者乃唐張弧之易（案唐張弧為大理寺評事有素履子别著録），是唐時又一偽本並行。故宋國史志以假託《子夏易傳》與真《子夏易傳》兩列其目，而《崇文總目》亦稱此書篇第畧依王氏,決非卜子夏之文也。朱彝尊《經義考證》以陸徳明《經典釋文》、李鼎祚《周易集解》、王應麟《困學記聞》所引皆今本所無，徳明鼎祚猶曰在張弧以前，應麟乃南宋末人，何以當日所見與今本乂異。然則今本又出偽託，不但非子夏書亦並非張弧書矣。流傳既久，姑存以備一家云爾。 --> 　
						</p>
					</div>
				</div>
			</div>
			<div class="ReviewWeekly_div">
				<p class="title titlepos">
					老师评语
				</p>
				<div class="padding10">
					<textarea class="textarea_t" id="comment"></textarea>
				</div>
			</div>
			<button type="button" id="bt" class="mui-btn mui-btn-warning horcenter btn_submit top_40 bottom_50" onclick="sumbit()">
				提交
			</button>
		</div>
		<div id="offlineAlert" class="weui_dialog_confirm" style="display: none;">
			<div class="weui_mask"></div>
			<div class="weui_dialog">
				<div class="weui_dialog_hd">
					<strong class="weui_dialog_title">是否放弃在此页面操作？</strong>
				</div>
				<div class="weui_dialog_bd"></div>
				<div class="weui_dialog_ft">
					<a onclick="cleanCancel()" href="#" class="weui_btn_dialog default"  style="color:#18b4ed">取消</a>
					<a onclick="cleanConfirm()" href="#" class="weui_btn_dialog primary"  style="color:#18b4ed">确定</a>
				</div>
			</div>
		</div>
	</body>
	<script type="text/javascript" src="../../script/jquery.min.js"></script>
	<script type="text/javascript" src="../../script/common.js"></script>
	<script type="text/javascript" src="../../script/api.js"></script>
	<script type="text/javascript" src="../../script/MD5.js"></script>
	<script type="text/javascript" src="../../script/requestTool.js"></script>
	<script type="text/javascript" src="../../script/base64.min.js"></script>
	<script type="text/javascript" src="../../script/copyTool.js"></script>
	<script type="text/javascript">
		var sid = 0;
		var commentScore = '';
		var parten = /^\s*$/;
		var weeklyid = '';
		var stuid = '';
		apiready = function() {
			// SendBehaviorTrajectoriesNotifi1('0', '老师端批改周报', '106', api.pageParam.sourceurl, api.pageParam.sourcetitle, window.location.pathname, document.title);
			var pageParam = api.pageParam;
			weeklyid = pageParam.weeklyid;
			loadWeeklyData();
			judgeiosTypeChange();
			stuid = pageParam.stuid;
			setupNotifi();
			blockAddCopyClickWithIdArr(["summary","weekplan"]);
		}
		function setupNotifi(){
			api.addEventListener({
			    name: 'showWeeklyAlertNotifi'
			}, function(ret, err) {
			    showAlert();
			});
		}

		//获取周报详情数据
		function loadWeeklyData() {
			var param = {
				weeklyid : weeklyid //未审核状态的周报列表
			};
			cfnetppPOST(urlLswklist, param, false, function(data, status) {
				if (status == 'success') {
					if (data.status == 1) {
						var list = data.json;
						if (list != null) {
							var name = list.rename1;
							api.sendEvent({
							    name: 'weeklynameNotifi',
							    extra: { 
							        weeklyname: name + "的周报"
							    }
							});
							var weeklytime = parseInt(list.weeklytime);
							var comments = list.comments;
							var time = parseInt(list.time);
							var weeklyStr = getLocalTime(weeklytime);
							if (isSameWeek(weeklytime, time) == true) {
								$('#time').text(getLocalTime(weeklytime));
								$('#timediv_one').hide();
							} else {
								$('#timediv_one').show();
								$('#time').text(getLocalTime(time));
								$('#weeklytime').text(weeklyStr);
							}
							$('#summary').text(isString(Base64.decode(list.summary)));
							$('#weekplan').text(isString(Base64.decode(list.weekplan)));
						} else {
							api.toast({
								msg : '获取数据失败',
								duration : 2000,
								location : 'bottom'
							});
						}
					} else {
						api.toast({
							msg : '获取数据失败',
							duration : 2000,
							location : 'bottom'
						});
					}
				} else {
					api.toast({
						msg : '网络连接失败',
						duration : 2000,
						location : 'bottom'
					});
				}
			});
		}

		//未审核周报老师评价提交
		function sumbit() {
			//			SendBehaviorTrajectoriesNotifi1('1', '老师端批改周报', '106');
			comment = $('#comment').val();
			if (comment.length <= 0 || parten.test(comment)) {
				commentScore = '无评语';
			} else {
				commentScore = comment;
			}
			var param = {
				jid : $api.getStorage('cfnetppjid'),
				lsid : $api.getStorage('cfnetppuid'),
				uid : $api.getStorage('cfnetppuid'),
				stuid : stuid,
				weeklyid : weeklyid,
				comments : Base64.encode(commentScore),
				message : api.pageParam.studentname + '的周报'
				//              comments : commentScore
			};
			cfnetppPOST(urlLsevaluate, param, false, function(data, status) {
				hideProgress();
				SendBusinessOperationsLogNotifi('老师端批改周报', '106', param, param, '', data, '教师端评价周报接口', '106-01')
				if (status == 'success') {
					if (data.status == 1) {
						api.toast({
							msg : '提交成功',
							duration : 2000,
							location : 'bottom'
						});
						sendNotifi();
						setTimeout(function() {
							next();
						}, 500);
					} else {
						ShowToast('提交失败，请重试');
					}
				} else {
					ShowToast('提交失败，请重试');
				}
			});
			//			}
		}

		function backKey() {
			api.addEventListener({
				name : 'keyback'
			}, function(ret, err) {
				showAlert();
			});
		}

		function showAlert() {
			commentScore = $('#comment').val();
			//			alert(summary);
			if (commentScore.length > 0) {
				$('#offlineAlert').show();
			} else {
				backClick();
			}
		}

		function cleanCancel() {
			$('#offlineAlert').hide();
		}

		//确定
		function cleanConfirm() {
			$('#offlineAlert').hide();
			backClick();
		}

		//		发送刷新周报已审核通知
		function sendNotifi() {
			api.sendEvent({
				name : 'RefreshWeeklyReviewedNotifi'
			});
		}

		function next() {
			api.closeToWin({
				name : 'Teacher_WeeklyWindow'
			});
		}

		function backClick() {
			api.sendEvent({
			    name: 'closeTeacher_WeeklyNoReviewedFrameDetailNotifi'
			});
			setTimeout(function(){//如果2秒后未关闭则自动关闭
				SendBehaviorTrajectoriesNotifi1('1', '老师端批改周报', '106', api.pageParam.sourceurl, api.pageParam.sourcetitle, window.location.pathname, document.title);
				api.closeWin({
				    name: 'Teacher_WeeklyNoReviewedFrameDetail'
				});
			}, 2000);
		}
	</script>
</html>